package com.wangce.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * ClassName: Order
 * Description:
 * date: 2021/11/22 9:23
 *
 * @author 凡人
 * @since JDK 1.8
 */
public class Order {
    private Integer id;     //主键
    private Long orderid;    //订单号
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date odate; //订单时间
    private String depot;//仓库
    private String orderer;//订货人
    private String place;//仓库位置
    private Long number;//物流号
    private Double oprice;//总金额
    private Double cost;//成本
    private Double discount;//折扣
    private Integer userid;//制单人
    private String way;//交货方式
    private String site;//交货地点

    private User user;
    private List<Detail> details;

    public Order() {
    }

    public Order(Integer id, Long orderid, Date odate, String depot, String orderer, String place, Long number, Double oprice, Double cost, Double discount, Integer userid, String way, String site, User user, List<Detail> details) {
        this.id = id;
        this.orderid = orderid;
        this.odate = odate;
        this.depot = depot;
        this.orderer = orderer;
        this.place = place;
        this.number = number;
        this.oprice = oprice;
        this.cost = cost;
        this.discount = discount;
        this.userid = userid;
        this.way = way;
        this.site = site;
        this.user = user;
        this.details = details;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderid=" + orderid +
                ", odate=" + odate +
                ", depot='" + depot + '\'' +
                ", orderer='" + orderer + '\'' +
                ", place='" + place + '\'' +
                ", number=" + number +
                ", oprice=" + oprice +
                ", cost=" + cost +
                ", discount=" + discount +
                ", userid=" + userid +
                ", way='" + way + '\'' +
                ", site='" + site + '\'' +
                ", user=" + user +
                ", details=" + details +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getOdate() {
        return odate;
    }

    public void setOdate(Date odate) {
        this.odate = odate;
    }

    public String getDepot() {
        return depot;
    }

    public void setDepot(String depot) {
        this.depot = depot;
    }

    public String getOrderer() {
        return orderer;
    }

    public void setOrderer(String orderer) {
        this.orderer = orderer;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public Long getNumber() {
        return number;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public Double getOprice() {
        return oprice;
    }

    public void setOprice(Double oprice) {
        this.oprice = oprice;
    }

    public Double getCost() {
        return cost;
    }

    public void setCost(Double cost) {
        this.cost = cost;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public Long getOrderid() {
        return orderid;
    }

    public void setOrderid(Long orderid) {
        this.orderid = orderid;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getWay() {
        return way;
    }

    public void setWay(String way) {
        this.way = way;
    }

    public String getSite() {
        return site;
    }

    public void setSite(String site) {
        this.site = site;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Detail> getDetails() {
        return details;
    }

    public void setDetails(List<Detail> details) {
        this.details = details;
    }
}

